#include <myheader_c_plus.h>
using std::endl;
using std::cout;
template<class T>
T add (T a, T b)
{
    cout << "template 1" << endl;
    return a + b;
}

template<class T1, class T2>
T1 add(T1 a, T2 b){
    cout << "template 2" << endl;
    return a + b;
}

template<class T1, int kbase = 10>
T1 multiply(T1 a, T1 b){
    return a * b * kbase;
}
int main(int argc, char *argv[])
{
    double c = add(1.4, 4.4);
    cout << c << endl;
    int d = add(4, 5);
    cout << d << endl;
    cout << add<float>(4.6, 9.8) << endl;
    double x = 1.32;
    int y = 3;
    cout << add(x, y) << endl;
    cout << add(y, x) << endl;

    cout << add<int>(x, y) << endl;
    cout << add<int>(y, x) << endl;
    cout << "====================" << endl;
    cout << multiply(10, 11) << endl;
    cout << multiply<int, 100>(10, 11) << endl;
    cout << multiply<int>(1.1, 3.0) << endl;
    return 0;
}

